/**
 * @description 在这里对菜单进行操作和记录
 * */

import { getMenu } from '@/api/base';
import { MenuState } from './type';

export const useMenuStore = defineStore('Menu', () => {
  const state: MenuState = {
    menu: [],
  };

  const getMenuStore = () => {
    getMenu().then(res => {
      state.menu = res.data;
    });
  };

  return {
    state,
    getMenuStore,
  };
});
